<!-- 求租 -->
<template>
  <div class="box">
    <div class="box-header">
      <div @click="fanhui">《返回</div>
      <div>楼市圈</div>
      <div></div>
    </div>

    <div class="box-bbody">
      <!-- 开始渲染 -->
      <dl v-for="(item, index) in list" :key="(item, index)">
        <div class="Xuanran-bxo">
          <div class="Xuan-A1">
            <div class="A1-A1">
              <div><img :src="item.img" alt="" /></div>
              <div><b>：</b>{{ item.name }}</div>
            </div>
            <div></div>
            <div></div>
          </div>
          <div class="Xuan-A2">
            <div class="Xuan-A-B1">
              <p>
                <b>{{ item.num }}/月</b>
              </p>
              <p>{{ item.num }}-{{ item.nummm }}/日</p>
            </div>
            <div class="Xuan-A-B2">
              <div class="X-Box1">{{ item.title }}</div>
              <div class="X-Box2">
                <img :src="item.img" alt="" />
              </div>
            </div>
          </div>
          <div class="Xuan-A3">删除</div>
        </div>
      </dl>
    </div>
    <div class="box-footer" @click="tianjia">+</div>
  </div>
</template>

<script>
import request from "../utility/request";
// import { defineComponent } from "vue";
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    //这里存放数据
    return {
      list: [],
    };
  },
  //监听属性 类似于data概念
  computed: {},
  //监控data中的数据变化
  watch: {},
  //方法集合
  methods: {
    tianjia() {
      this.$router.push("/Fabu");
    },
    fanhui() {
      this.$router.push("/Home");
    },
  },
  //生命周期 - 创建完成（可以访问当前this实例）
  async created() {
    const res = await request("/get1");
    console.log(res.list);
    this.list = res.list;
  },
  //生命周期 - 挂载完成（可以访问DOM元素）
  mounted() {},
};
</script>
<style lang='scss' scoped>
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: paleturquoise;
}
.box-header {
  color: #fff;
  width: 100%;
  height: 50px;
  background: blue;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0px 10px;
  border: 1px solid #000;
}
.box-bbody {
  width: 100%;
  flex: 1;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  background: rgb(255, 255, 255);
  border-top: 1px solid #ccc;
  position: relative;
}
.box-footer {
  color: #fff;
  font-size: 50px;
  margin-top: 70%;
  margin-left: 80%;
  width: 50px;
  height: 50px;
  background: rgb(4, 125, 224);
  text-align: center;
  line-height: 50px;
  border-radius: 50%;
  position: absolute;
}
.box-footer:hover {
  color: #000;
  background: rgb(0, 255, 170);
}
.box-bbody dl {
  padding: 0px 20px;
  width: 100%;
  height: 300px;
  background: rgb(255, 255, 255);
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}
.Xuanran-bxo {
  width: 100%;
  height: 300px;
  // background: rgb(255, 255, 255);
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
}
.Xuan-A1 {
  width: 100%;
  height: 100px;
  // background: greenyellow;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.A1-A1 {
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.A1-A1 img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
}
.Xuan-A2 {
  width: 100%;
  height: 150px;
  // background: powderblue;
  display: flex;
  // flex-direction: column;
  justify-content: space-between;
  align-items: center;
}
.Xuan-A-B1 {
  width: 20%;
  height: 100%;
  // background: rgb(235, 31, 31);
}
.Xuan-A-B2 {
  width: 80%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.X-Box1 {
  width: 100%;
  height: 50px;
  line-height: 50px;
}
.X-Box2 {
  width: 100%;
  height: 100px;
}
.X-Box2 img {
  width: 100%;
  height: 100px;
}
// .Xuan-A2
.Xuan-A3 {
  font-weight: bolder;
  width: 100%;
  height: 50px;
  border-bottom: 1px solid #ccc;
  text-align: center;
  line-height: 50px;
}
.Xuan-A3:hover {
  font-weight: bolder;
  background: red;
  color: #fff;
  border-radius: 10px;
}
</style>
